package com.third.customer.model.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.third.customer.model.dao.param.AreaParam;
import com.third.customer.model.tables.Area;

import java.util.List;
import java.util.Optional;

/**
 * Created by hehuaichun on 2020/5/21.
 */
public interface AreaDao {

    Page<Area> query(AreaParam param);

    Optional<Area> getById(long companyId, Long areaId);

    List<Area> getByIds(long companyId, List<Long> areaIds);

    List<Area> getByCompanyId(long companyId);

    Optional<Area> getByAreaName(Long companyId, String county, String community);

    boolean insert(Area area);

    boolean update(Area area);

    boolean delete(Long id);
}
